package sendmethodinterfacelogic

import (
	"context"

	"dfx_cmdb/cmdb-sendmsg-rpc/internal/svc"
	cmdb_database_sync "dfx_cmdb/cmdb-sendmsg-rpc/types/cmdb-database-sync"

	"github.com/zeromicro/go-zero/core/logx"
)

type QuerySendMethodLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewQuerySendMethodLogic(ctx context.Context, svcCtx *svc.ServiceContext) *QuerySendMethodLogic {
	return &QuerySendMethodLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// GetSendMethod 查询发送方式列表
func (l *QuerySendMethodLogic) QuerySendMethod(in *cmdb_database_sync.QueryCloudInfoRequest) (*cmdb_database_sync.SendMethodListResponse, error) {
	// todo: add your logic here and delete this line
	

	return &cmdb_database_sync.SendMethodListResponse{}, nil
}

// func tableDataToResponseData(tableData []cmdbsendmsg.SendMethod) (responseData []*cmdb_database_sync.SendMethodInfo) {
// 	for _, v := range tableData {
// 		responseData = append(responseData, &cmdb_database_sync.SendMethodInfo{
// 			ID:             v.Id,
// 			SendUrl:        v.SendUrl,
// 			SendMethodType: v.SendMethodType,
// 			CloudId:        int32(v.CloudId),
// 			TemplateID:     int32(v.TemplateID),
// 		})
// 	}

// 	logx.Debugf("转换后数据: %v", responseData)
// 	return responseData
// }
